import Main from '@/view/main'
import parentView from '@/components/parent-view'
import store from '@/store/module/user.js'

export default [
  {
    path: '/login',
    name: 'login',
    meta: {
      title: 'Login - 登录',
      hideInMenu: true
    },
    component: () => import('@/view/login/login.vue')
  },
  {
    path: '/',
    name: 'index',
    redirect: '/home',
    component: Main,
    meta: {
      hideInMenu: true,
      notCache: true
    },
    children: [
      {
        path: 'home',
        name: 'home',
        meta: {
          // hideInMenu: true,
          // notCache: true,
          icon: 'social-buffer',
          title: '主页'
        },
        component: () => import('@/view/single-page/home')
      }
    ]
  },
  {
    path: '/parking',
    name: 'parking',
    meta: {
      icon: 'social-buffer',
      title: '停车管理',
      isSuper: 2,
    },
    component: Main,
    children: [
      {
        path: 'lot',
        name: 'lot',
        meta: {
          icon: 'arrow-graph-up-right',
          title: '停车场管理'
        },
        component: () => import('../view/parking/lot.vue')
      },
      {
        path: 'space',
        name: 'space',
        meta: {
          icon: 'arrow-graph-up-right',
          title: '停车位管理'
        },
        component: () => import('../view/parking/space.vue')
      }
    ]
  },
  {
    path: '/deviceMng',
    name: 'deviceMng',
    meta: {
      icon: 'social-buffer',
      title: '设备管理',
      isSuper: 2,
    },
    component: Main,
    children: [
      {
        path: '/deviceUpload',
        name: 'deviceUpload',
        meta: {
          icon: 'arrow-graph-up-right',
          title: '设备升级包上传'
        },
        component: () => import('../view/device/deviceUpload.vue')
      },
      {
        path: '/deviceInstall',
        name: 'deviceInstall',
        meta: {
          icon: 'arrow-graph-up-right',
          title: '设备升级'
        },
        component: () => import('../view/device/deviceInstall.vue')
      },
    ]
  },
  {
    path:'/parkingMonitor',
    name:'parkingMonitor',
    meta:{
      icon: 'social-buffer',
      title: '停车场监控'
    },
    component: Main,
    children: [
      {
        path: '/monitorData',
        name: 'monitorData',
        meta: {
          icon: 'arrow-graph-up-right',
          title: '监控数据',
          keepAlive: true
        },
        component: () => import('../view/monitor/monitorData.vue')
      },
      {
        path: '/monitorMap',
        name: 'monitorMap',
        meta: {
          icon: 'arrow-graph-up-right',
          title: '地图'
        },
        component: () => import('../view/monitor/map.vue')
      }
    ]
  },
  {
    path: '/user',
    name: 'user',
    meta: {
      icon: 'social-buffer',
      title: '企业用户管理',
      isSuper: 2,
    },
    component: Main,
    children: [
      {
        path: 'userIndex',
        name: 'userIndex',
        meta: {
          icon: 'arrow-graph-up-right',
          title: '用户列表'
        },
        component: () => import('../view/user/index.vue')
      },
      {
        path: 'orgIndex',
        name: 'orgIndex',
        meta: {
          icon: 'arrow-graph-up-right',
          title: '机构列表'
        },
        component: () => import('../view/org/org.vue')
      },
    ]
  },

  {
    path: '/401',
    name: 'error_401',
    component: () => import('@/view/error-page/401.vue')
  },
  {
    path: '/500',
    name: 'error_500',
    component: () => import('@/view/error-page/500.vue')
  },
  {
    path: '*',
    name: 'error_404',
    component: () => import('@/view/error-page/404.vue')
  }
]



